<!DOCTYPE html>
<html>
  <head>
    <title>Listing 7.14</title>
    <script type="text/javascript" src="../scripts/assert.js"></script>
    <link href="../styles/assert.css" rel="stylesheet" type="text/css">
  </head>
  <body>
    <script type="text/javascript">

      var html = "<b>Hello</b>\n<i>world!</i>";                   //#1

      assert(/.*/.exec(html)[0] === "<b>Hello</b>",               //#2
             "A normal capture doesn't handle endlines.");

      assert(/[\S\s]*/.exec(html)[0] ===                          //#3
             "<b>Hello</b>\n<i>world!</i>",
             "Matching everything with a character set.");

      assert(/(?:.|\s)*/.exec(html)[0] ===                        //#4
             "<b>Hello</b>\n<i>world!</i>",
             "Using a non-capturing group to match everything.");

    </script>
  </body>
</html>
